package cn.bb.bbstudy.service.impl;

import cn.bb.bbstudy.dao.QuestionCategoryDAO;
import cn.bb.bbstudy.pojo.QuestionCategory;
import cn.bb.bbstudy.service.QuestionCategoryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class QuestionCategoryServiceImpl implements QuestionCategoryService{

    @Resource
    private QuestionCategoryDAO questionCategoryDAO;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return questionCategoryDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(QuestionCategory record) {
        return questionCategoryDAO.insert(record);
    }

    @Override
    public int insertSelective(QuestionCategory record) {
        return questionCategoryDAO.insertSelective(record);
    }

    @Override
    public QuestionCategory selectByPrimaryKey(Integer id) {
        return questionCategoryDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(QuestionCategory record) {
        return questionCategoryDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(QuestionCategory record) {
        return questionCategoryDAO.updateByPrimaryKey(record);
    }

    public List<QuestionCategory> selectAll() {
        return questionCategoryDAO.selectAll();
    }
}
